package com.kerbores.blog.bean;

import java.util.Date;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.One;
import org.nutz.dao.entity.annotation.Table;
import org.nutz.lang.Times;

/**
 * @author 贵源 <br>
 *         create at 2014年10月19日
 */
@Table("b_comment")
public class Comment extends Entity {

	public User getCommenter() {
		return commenter;
	}

	public void setCommenter(User commenter) {
		this.commenter = commenter;
	}

	@Column("article_id")
	private int articleId;
	@Column("comment")
	private String comment;
	@Column("user_id")
	private int userId;
	@Column("publish_date")
	private Date publishDate = Times.now();
	@One(field = "userId", key = "id", target = User.class)
	private User commenter;

	public int getArticleId() {
		return articleId;
	}

	public void setArticleId(int articleId) {
		this.articleId = articleId;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public Date getPublishDate() {
		return publishDate;
	}

	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}

}
